package com.runa.protocol.analysis;

import com.runa.protocol.dto.IInterData;

public abstract class ShellBufferAnalysis<T> implements DataAnalysis<T> {

    protected MetaBufferAnalysis analysis;

    protected IInterData interData;

    protected byte[] buffer;

    public String netEquNo;

    public ShellBufferAnalysis(MetaBufferAnalysis analysis, int initSize) {
        this.analysis = analysis;
        if (initSize > 0) {
            this.buffer = new byte[initSize];
        }
    }

    public void expand(int newLen) {
        buffer = new byte[newLen];
    }

    @Override
    public IInterData gain() {
        return interData;
    }
}
